#pragma once
#include "LBProjectPlanPlug/ProjectExplorerEditor.h"
#include "BaseModel.h"
#include "LBBasePlug\PopMenuEditor.h"
#include "LBProjectPlanPlug/ExplorerTreeModel.h"

namespace LBPROJLOGIC
{
    class CProjectExplorerEditor : public CProjBaseModel
        , public IProjectExplorerEditor
        , public LBBaseLogic::IPopMenuCallBack
    {
        REF_DECLARE_DYNCREATE(CProjectExplorerEditor);
    public:
        CProjectExplorerEditor();
        virtual ~CProjectExplorerEditor();

    public:
        virtual void ConnectExplorerTree(QTreeView* pTree) override;
        virtual void ConnectToolBar(QToolBar* pToolBar) override;

        //IPopMenuCallBack
        virtual bool IsEnable(const QString& strMenuId) override;
        virtual bool Execute(const QString& strMenuId) override;

    private:
        void OnAddPlan();

    protected:
    private:
        QTreeView* m_pExplorerTree;
        QToolBar* m_pToolBar;
        LBPROJLOGIC::CExplorerTreeModel* m_pModel;
    };
}
